package com.hirisun.wicket.dropdownchoice;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import org.apache.wicket.extensions.markup.html.form.palette.component.Choices;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.form.Button;
import org.apache.wicket.markup.html.form.ChoiceRenderer;
import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.markup.html.form.Form;

public class DropDownChiocePage extends WebPage {

	public static  List<String> choices = new ArrayList<String>();
	private List list ;
	
 
 

	static{
		choices.add("beijing");
		choices.add("shanghai");
		choices.add("tianjin");
	}

public DropDownChiocePage() {
	
	Form form = new Form("form"){
		@Override
		protected void onSubmit() {

			System.out.println(choices);
		}
	};

	
	DropDownChoice<String> dropDownChoice = new DropDownChoice<String>("dropdownchoice", choices );
	form.add(new Button("sumbit"));
 
	form.add(dropDownChoice);
	
	 this.add(form );
	 
	
	
}
	
	
}
